﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IPTE.Manager
{
    public class StringValueList<T> : List<T>
    {
        private string oldStatus = string.Empty;
        public void HandleValueChange(System.Action<object> valueChangeHandler)
        {
            string current = this.ToString();
            if (current != oldStatus)
            {
                valueChangeHandler(null);
                this.oldStatus = current;
            }
        }
        public override string ToString()
        {
            StringBuilder str = new StringBuilder();
            foreach (object c in this)
            {
                str.Append(c.ToString());
            }
            return str.ToString();
        }
    }
}
